//
//  ViewController.m
//  DFAFilterDemo
//
//  Created by 张福杰 on 2019/10/22.
//  Copyright © 2019 张福杰. All rights reserved.
//

#import "ViewController.h"
#import "DFAFilter.h"
#import "FunctionRunTime.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CGFloat time = [FunctionRunTime runTimeBlock:^{
        DFAFilter *dfaFilter = [[DFAFilter alloc] init];
        [dfaFilter parseSensitiveWords:nil];

        NSString *message = @"小明骂小王是个王八蛋，小王骂小明是个王八羔子！";
        
        NSLog(@"message == %@",message);
            
        NSString *result = [dfaFilter filterSensitiveWords:message replaceKey:nil];

        
        NSLog(@"result == %@",result);
     }];
    NSLog(@"总共耗时: %f \n\n", time);
    
    
}


@end
